package org.spring.springboot.controller;

import org.spring.springboot.dubbo.DubboService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;

@RestController
public class DubboController {

	@Reference(version = "1.0.0", url = "dubbo://localhost:20881")
	private DubboService dubboService;

	@GetMapping("/printName")
	public String printName() {
		String name = "小白";
		return dubboService.findByName(name);

	}

}
